LGF_DTLToString_US (FC / 1.0.1)

Overview

Author: Siemens Digital Industry

Short description

This function converts a date of data type DTL into a character string of data type STRING in American format (US) (MM DD YYYY…).

Block Interface

LGF_DTLToString_US (FC)
DTL  date Ret_Val  String
    
Char  separator   
    
Char  separatorDateAndTime   
    
   

Input parameter

IdentifierData type Description
dateDTL Date to convert as DTL tag
separatorChar Separator between the components of the output date.
separatorDateAndTimeChar Separator between the components date and time.

Output parameter

IdentifierData type Description
Ret_ValString Output string in accordance with the American format (US).
Example: `01-22-2019 14:06:51.524621000`

Functional description

The block reads a date of data type DTL and converts the individual components of the date (year, month, day, hour…) into a character string and outputs it in American format (US). The separator between the components of the date is variable.

American format (US):

LGF_DTLToString_US - Structure of the character string in accordance with American format

Separator:

At the input parameter separator, you specify the separator between the components of the date, at seperatorDateAndTime you specify the separator between the date and the time.

Example:

Change log

Version & DateChange description
1.0.0Siemens Industry Online Support
28.07.2025First released version
1.0.1Simatic Systems Support
09.10.2025Spelling errors